home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DJINC106.ARJ / GPPCONIO.H < prev    next >
C/C++ Source or Header  |  1991-11-05  |  3KB  |  107 lines

  1. /**********************************************************************
  2.  *  
  3.  *  NAME:           gppconio.h
  4.  *  
  5.  *  DESCRIPTION:    simulate Borland text video funcs for GNU C++
  6.  *  
  7.  *  copyright (c) 1991 J. Alan Eldridge
  8.  * 
  9.  *  M O D I F I C A T I O N   H I S T O R Y
  10.  *
  11.  *  when        who                 what
  12.  *  -------------------------------------------------------------------
  13.  *  10/27/91    J. Alan Eldridge    created
  14.  *  
  15.  *********************************************************************/
  16.  
  17. #ifndef __GPPCONIO_H
  18. #define __GPPCONIO_H
  19.  
  20. #if defined(__TURBOC__)
  21. #error  Use conio.h for Borland compilers!
  22. #endif
  23.  
  24. #define _NOCURSOR      0
  25. #define _SOLIDCURSOR   1
  26. #define _NORMALCURSOR  2
  27.  
  28. struct text_info {
  29.     unsigned char winleft;
  30.     unsigned char wintop;
  31.     unsigned char winright;
  32.     unsigned char winbottom;
  33.     unsigned char attribute;
  34.     unsigned char normattr;
  35.     unsigned char currmode;
  36.     unsigned char screenheight;
  37.     unsigned char screenwidth;
  38.     unsigned char curx;
  39.     unsigned char cury;
  40. };
  41.  
  42. enum text_modes { LASTMODE=-1, BW40=0, C40, BW80, C80, MONO=7, C4350=64 };
  43.  
  44. enum COLORS {
  45.     /*  dark colors     */
  46.     BLACK,          
  47.     BLUE,
  48.     GREEN,
  49.     CYAN,
  50.     RED,
  51.     MAGENTA,
  52.     BROWN,
  53.     LIGHTGRAY,
  54.     /*  light colors    */
  55.     DARKGRAY,
  56.     LIGHTBLUE,
  57.     LIGHTGREEN,
  58.     LIGHTCYAN,
  59.     LIGHTRED,
  60.     LIGHTMAGENTA,
  61.     YELLOW,
  62.     WHITE
  63. };
  64.  
  65. #define BLINK   0x80    /*  blink bit   */
  66.  
  67. #ifdef  __cplusplus
  68. extern "C" {
  69. #endif
  70.  
  71. void    clreol(void);
  72. void    clrscr(void);
  73. void    gotoxy(int x, int y);
  74. int     wherex(void);
  75. int     wherey(void);
  76. int     putch(int c);
  77.  
  78. void    delline(void);
  79. int     gettext(int left, int top, int right, int bottom, void *destin);
  80. void    gettextinfo(struct text_info *r);
  81. void    highvideo(void);
  82. void    insline(void);
  83. void    lowvideo(void);
  84. int     movetext(int left, int top, int right, int bottom, 
  85.             int destleft, int desttop);
  86. void    normvideo(void);
  87. int     puttext(int left, int top, int right, int bottom, void *source);
  88. void    textattr(int attr);
  89. void    textbackground(int color);
  90. void    textcolor(int color);
  91. void    textmode(int unused_mode);
  92. void    window(int left, int top, int right, int bottom);
  93. void    _setcursortype(int unused_type);
  94. /* char    *cgets(char *str); */
  95. int     cprintf(const char *format, ...);
  96. int     cputs(const char *str);
  97. /* int     cscanf(const char *format, ...); */
  98. /* char    *getpass(const char *prompt); */
  99.  
  100. void gppconio_init(void);
  101.  
  102. #ifdef  __cplusplus
  103. }
  104. #endif
  105.  
  106. #endif
  107.